package com.github.boluo1230.wechat.controller;

import com.github.boluo1230.wechat.base.ServerResponse;
import com.github.boluo1230.wechat.service.sys.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/sys/menu")
@RestController
public class SysMenuController {

    @Autowired
    private SysMenuService sysMenuService;

    @RequestMapping("/list")
    public ServerResponse getSysMenuList(Integer userId) {
        return ServerResponse.createBySuccess(sysMenuService.getUserMenuList(userId));
    }

    @RequestMapping("/nav")
    public ServerResponse getSysMenuNav() {
        return ServerResponse.createBySuccess(sysMenuService.queryNotButtonList());
    }

}
